package 
{	
	import flash.xml.XMLDocument;
	import flash.xml.XMLNode;
	public function getXMLFromArray( p_list:Array ):XMLNode
	{
		var list: Array = new Array()
		for (var i :String in p_list) {
			list[i] = p_list[i];
		}
		var result : XMLNode = new XMLNode(1,list.shift());
		var lastChild : XMLNode;
		for each (var item : String in list){
			if(!lastChild){
				result.appendChild( new XMLNode(1,item) );
				lastChild = result.lastChild;
			}
			else{
				lastChild.appendChild( new XMLNode(1,item) );
				lastChild = lastChild.lastChild
			}
		}
		return result;
	}
}